{include file="header/index" /}
<div class="container Authority hides" style="display: block;">
    <ul class="clearfix" style="margin:0px" id="MenuShowList">
        <li class="fl {if condition="$action eq 'index'"}current{/if}"><a href="{:url('systemset/index')}">系统设置</a></li>
        <li class="fl {if condition="$action eq 'weixin'"}current{/if}"><a href="{:url('systemset/weixin')}">公众号管理</a></li>
        <li class="fl {if condition="$action eq 'channel'"}current{/if}"><a href="{:url('systemset/channel')}">短信/smtp配置</a></li>
    </ul>
</div>
<div class="container bgwhite">
    <div class="system-center">
        <h2>公众号配置信息</h2>

        <p class="system-center-box">
            <label class="system-center-name">配置名</label>
            <input class="system-center-web" type="text" value="app_id" name="" placeholder="app_id" readonly="true">
        </p>
        <div class="system-center-box">
            <label class="system-center-name">配置值</label>
            <input id="app_id" class="system-center-web" type="text" value="{$data.app_id}" name="" placeholder="">
        </div>
        <p class="system-center-box">
            <label class="system-center-name">配置名</label>
            <input class="system-center-web" type="text" value="app_secret" name="" placeholder="app_secret" readonly="true">
        </p>
        <div class="system-center-box">
            <label class="system-center-name">配置值</label>
            <input id="app_secret" class="system-center-web" type="text" value="{$data.app_secret}" name="" placeholder="">
        </div>

    </div>

    <p class="system-bottom-btn">
        <button type="button" class="system-Determine" onclick="sub()">保存</button>
        <button type="button" class="system-Reset">重置</button>
    </p>
</div>
<script type="text/javascript">
     //提交
    function sub(){
        app_id = $("#app_id").val();
        app_secret  = $("#app_secret").val();
        if(app_id.length==0){
            layer.msg("请输入app_id");return false;
        }
        if(app_secret.length==0){
            layer.msg("请输入app_secret");return false;
        }

       $.getJSON("{:url('Systemset/edit')}", {'name':'wx_config','app_id':app_id,'app_secret':app_secret}, function(res){
            layer.msg(res.msg);
        });
    }
</script>
</body>
</html>
